
clear 
set obs 1
gen run=`run'

local cols 9

*saves the local macros of coefficients and standard errors created in previous files for each iteration and appends them.
*calculates t-values for HSW LSW coefficients and saves them as well

foreach col of numlist 1/`cols' {
	di "`col'"
	gen rc_`col'= `rc`col''
	if `rc`col''== 0 {
		gen beta_L_`col'=`bLSW_`col''
		di "`col'"
		gen beta_H_`col'=`bHSW_`col''
		gen std_L_`col'=`stdLSW_`col''
		di "`col'"
		gen std_H_`col'=`stdHSW_`col''
		*and the t values
		gen tcol_`col'=`bLSW_`col''/`stdLSW_`col''
		di "`col'"
		gen tcol_HSW_`col'=`bHSW_`col''/`stdHSW_`col''
	}
}
append using ${monte_data_dir}/storage_runs_`pvers'_`rname'.dta
drop if run==.
save ${monte_data_dir}/storage_runs_`pvers'_`rname'.dta, replace
